Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new resolution-guessing implementation that returns a structured resolution object (value + reason), migrates the codebase away from the old toputils.guess_resolution, and updates settings/schema and regression expectations accordingly.
Changes:
- Added
grodecoder.guesser.guess_resolution()returning aMolecularResolutionmodel with{value, reason}, plus new unit tests. - Removed the legacy
guess_resolutionfromtoputilsand updated core/CLI/settings to use the new resolution model and renameddistance_cutoff→cutoff_distance. - Updated regression expected JSON outputs to the new resolution schema, removed
streamlitfrom dev deps, and refreshed lockfile versions.
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked dependency versions and artifacts. |
| pyproject.toml | Removes streamlit from dev dependencies. |
| src/grodecoder/toputils.py | Removes legacy guess_resolution implementation. |
| src/grodecoder/guesser.py | Adds new resolution guessing logic and resolution/reason models. |
| src/grodecoder/core.py | Switches decode flow to new guesser + renamed cutoff settings. |
| src/grodecoder/settings.py | Renames cutoff fields and updates cutoff-guessing plumbing. |
| src/grodecoder/models.py | Replaces old MolecularResolution enum with guesser model type. |
| src/grodecoder/main.py | Updates CLI → settings assignment to cutoff_distance. |
| src/grodecoder/identifier.py | Minor typing/selection string adjustments. |
| src/grodecoder/databases/api.py | Expands ModelType TypeVar to include MAD/CSML residue models. |
| tests/test_toputils/test_toputils_integration.py | Removes integration tests tied to old toputils.guess_resolution. |
| tests/test_toputils/test_toputils.py | Removes unit tests tied to old toputils.guess_resolution. |
| tests/test_guesser.py | Adds unit tests for new resolution guesser behavior. |
| tests/data/regression_data/expected_results/noriega_CG_CRD_3CAL.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/noriega_AA_CRD_3CAL.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/barstar.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/RNA_start.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/DNA_start.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/DMPC_PI.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/5ZOA.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/5MBA.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/4ZRY.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/4MQJ_ABCD.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/2MAT.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/1QJ8_solution.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/1QJ8_membrane.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/1QJ8_ETH_ACN_MET_URE_SOL.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/1QJ8.json | Updates expected output (resolution now structured, plus key ordering). |
| tests/data/regression_data/expected_results/1BRS.json | Updates expected output (resolution now structured, plus key ordering). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rResolution class
…decoder into feature/new-guess-resolution
- settings.DistanceCutoff.guess: update to account for new MolecularResolution class - various minor fixes
…decoder into feature/new-guess-resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.